package com.platform.mall.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.platform.mall.common.base.BaseEntity;
import com.platform.mall.common.valid.Create;
import com.platform.mall.common.valid.Update;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;

@Data
@Accessors(chain = true)
public class SysDictDetail extends BaseEntity {

    @NotBlank(message = "修改字典数据id不能为null！", groups = {Update.class})
    @TableId(type = IdType.AUTO)
    private Long id;

    @NotBlank(message = "创建字典数据key不能为null", groups = {Create.class, Update.class})
    private Long dictId;

    @NotBlank(message = "创建字典数据label不能为null", groups = {Create.class, Update.class})
    private String label;

    @NotBlank(message = "创建字典数据value不能为null", groups = {Create.class, Update.class})
    private String value;

    @NotBlank(message = "创建字典数据编码不能为null", groups = {Create.class, Update.class})
    private String dictCode;

    private Integer sort;

    private Integer defaulted;

    private String remark;

}
